package de.bk.timecalc.gui;

import de.bk.timecalc.core.Item;
import de.bk.timecalc.core.ProbabilisticDistribution;
import de.bk.timecalc.core.TimeCalcCore;
import de.bk.timecalc.core.TimerDirection;

class SettingsModel
{
  private TimerDirection timerDirection;
  private ProbabilisticDistribution<Item> itemDistribution;
  private boolean roundToFiveSeconds;
  private boolean ignoreMinute;

  SettingsModel()
  {
    this.timerDirection = TimerDirection.UP;
    this.itemDistribution = TimeCalcCore.DEFAULT_ITEM_DISTRIBUTION;
  }

  SettingsModel(SettingsModel settingsModel)
  {
    this.timerDirection = settingsModel.timerDirection;
    this.itemDistribution = new ProbabilisticDistribution<Item>(
        settingsModel.itemDistribution);
    this.roundToFiveSeconds = settingsModel.roundToFiveSeconds;
  }

  TimerDirection getTimerDirection()
  {
    return this.timerDirection;
  }

  void setTimerDirection(TimerDirection timerDirection)
  {
    this.timerDirection = timerDirection;
  }

  ProbabilisticDistribution<Item> getItemDistribution()
  {
    return this.itemDistribution;
  }

  void setItemDistribution(ProbabilisticDistribution<Item> itemDistribution)
  {
    this.itemDistribution = itemDistribution;
  }

  boolean isRoundToFiveSeconds()
  {
    return this.roundToFiveSeconds;
  }

  void setRoundToFiveSeconds(boolean roundToFiveSeconds)
  {
    this.roundToFiveSeconds = roundToFiveSeconds;
  }

  boolean isIgnoreMinute()
  {
    return this.ignoreMinute;
  }

  public void setIgnoreMinute(boolean ignoreMinute)
  {
    this.ignoreMinute = ignoreMinute;
  }
}
